<?php
class Master_gaji extends CI_Model 
{

	function __construct()
	{
		parent::__construct();
	}
	
	function add($dataInsert)
	{
		$query = $this->db->insert('mr_gaji', $dataInsert);
		return $query;
	}
		
	function read()
	{	
		return $this->db->get('mr_gaji');
	}
	
	function edit($nis)
	{
		$this->db->where('id_mr_gaji',$nis);
		$query=$this->db->get('mr_gaji');
		return $query->result();
	}
	
	function update($id_mr_gaji,$dataInsert)
	{
		$this->db->where('id_mr_gaji', $id_mr_gaji);
		$update = $this->db->update('mr_gaji', $dataInsert);
		return $update;
	}
	
	function delete($id_mr_gaji)
	{
		$this->db->where('id_mr_gaji', $id_mr_gaji);
		$delete = $this->db->delete('mr_gaji');
		return $delete;
	}

	function limit($limit,$offset)
	{	
		return $this->db->get('mr_gaji',$limit,$offset);
	}

	function num_rows()
	{	
		$query = $this->db->get('mr_gaji');
		return $query->num_rows();
	}
	
}